package com.blr.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: DemoController
 * Description:
 * Date: 2022/11/08 PM 2:57:50
 * <p>
 * project: codes
 * package: com.blr.controller
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@RestController
//@CrossOrigin // 代表类中的所有方法允许跨域 springmvc 注解解决方案
public class DemoController {

    @GetMapping("/demo")
    // 用来解决允许跨域访问注解
    //@CrossOrigin(origins = {"http://localhost:63342"})
    //@CrossOrigin
    public String demo() {
        System.out.println("demo ok!");
        return "demo ok!";
    }
}
